Optimal. Leaf size=56 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}+\frac {\log \left (a-b+2 a x^2+a x^4\right )}{4 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {1128, 648, 632,
212, 642} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (x^2+1\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}+\frac {\log \left (a x^4+2 a x^2+a-b\right )}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 1128
Rubi steps
\begin {align*} \int \frac {x^3}{a-b+2 a x^2+a x^4} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {x}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\\ &=-\left (\frac {1}{2} \text {Subst}\left (\int \frac {1}{a-b+2 a x+a x^2} \, dx,x,x^2\right )\right )+\frac {\text {Subst}\left (\int \frac {2 a+2 a x}{a-b+2 a x+a x^2} \, dx,x,x^2\right )}{4 a}\\ &=\frac {\log \left (a-b+2 a x^2+a x^4\right )}{4 a}+\text {Subst}\left (\int \frac {1}{4 a b-x^2} \, dx,x,2 a \left (1+x^2\right )\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b}}+\frac {\log \left (a-b+2 a x^2+a x^4\right )}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 51, normalized size = 0.91 \begin {gather*} \frac {\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \left (1+x^2\right )}{\sqrt {b}}\right )}{\sqrt {b}}+\log \left (-b+a \left (1+x^2\right )^2\right )}{4 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 49, normalized size = 0.88
method | result | size |
default | \(\frac {\ln \left (a \,x^{4}+2 a \,x^{2}+a -b \right )}{4 a}+\frac {\arctanh \left (\frac {2 a \,x^{2}+2 a}{2 \sqrt {a b}}\right )}{2 \sqrt {a b}}\) | \(49\) |
risch | \(\frac {\ln \left (\left (a \sqrt {a b}-a b \right ) x^{2}+a \sqrt {a b}-\sqrt {a b}\, b \right )}{4 a}+\frac {\ln \left (\left (a \sqrt {a b}-a b \right ) x^{2}+a \sqrt {a b}-\sqrt {a b}\, b \right ) \sqrt {a b}}{4 b a}+\frac {\ln \left (\left (-a \sqrt {a b}-a b \right ) x^{2}-a \sqrt {a b}+\sqrt {a b}\, b \right )}{4 a}-\frac {\ln \left (\left (-a \sqrt {a b}-a b \right ) x^{2}-a \sqrt {a b}+\sqrt {a b}\, b \right ) \sqrt {a b}}{4 b a}\) | \(172\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 60, normalized size = 1.07 \begin {gather*} -\frac {\log \left (\frac {a x^{2} + a - \sqrt {a b}}{a x^{2} + a + \sqrt {a b}}\right )}{4 \, \sqrt {a b}} + \frac {\log \left (a x^{4} + 2 \, a x^{2} + a - b\right )}{4 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 134, normalized size = 2.39 \begin {gather*} \left [\frac {b \log \left (a x^{4} + 2 \, a x^{2} + a - b\right ) + \sqrt {a b} \log \left (\frac {a x^{4} + 2 \, a x^{2} + 2 \, \sqrt {a b} {\left (x^{2} + 1\right )} + a + b}{a x^{4} + 2 \, a x^{2} + a - b}\right )}{4 \, a b}, \frac {b \log \left (a x^{4} + 2 \, a x^{2} + a - b\right ) - 2 \, \sqrt {-a b} \arctan \left (\frac {\sqrt {-a b}}{a x^{2} + a}\right )}{4 \, a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 110 vs.
\(2 (48) = 96\).
time = 0.32, size = 110, normalized size = 1.96 \begin {gather*} \left (\frac {1}{4 a} - \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) \log {\left (x^{2} + \frac {4 a b \left (\frac {1}{4 a} - \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) + a - b}{a} \right )} + \left (\frac {1}{4 a} + \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) \log {\left (x^{2} + \frac {4 a b \left (\frac {1}{4 a} + \frac {\sqrt {a^{3} b}}{4 a^{2} b}\right ) + a - b}{a} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.48, size = 46, normalized size = 0.82 \begin {gather*} -\frac {\arctan \left (\frac {a x^{2} + a}{\sqrt {-a b}}\right )}{2 \, \sqrt {-a b}} + \frac {\log \left (a x^{4} + 2 \, a x^{2} + a - b\right )}{4 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 153, normalized size = 2.73 \begin {gather*} \frac {\ln \left (x^2\,\sqrt {a^3\,b}+a\,b-a^2-a^2\,x^2\right )}{4\,a}+\frac {\ln \left (x^2\,\sqrt {a^3\,b}-a\,b+a^2+a^2\,x^2\right )}{4\,a}-\frac {\ln \left (x^2\,\sqrt {a^3\,b}-a\,b+a^2+a^2\,x^2\right )\,\sqrt {a^3\,b}}{4\,a^2\,b}+\frac {\ln \left (x^2\,\sqrt {a^3\,b}+a\,b-a^2-a^2\,x^2\right )\,\sqrt {a^3\,b}}{4\,a^2\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________